// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

using Elastic.Transport;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

#nullable restore
namespace Elastic.Clients.Elasticsearch.Security
{
	public sealed class SecurityGetApiKeyRequestParameters : RequestParameters<SecurityGetApiKeyRequestParameters>
	{
		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Id? Id { get => Q<Elastic.Clients.Elasticsearch.Id?>("id"); set => Q("id", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Name? Name { get => Q<Elastic.Clients.Elasticsearch.Name?>("name"); set => Q("name", value); }

		[JsonIgnore]
		public bool? Owner { get => Q<bool?>("owner"); set => Q("owner", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Name? RealmName { get => Q<Elastic.Clients.Elasticsearch.Name?>("realm_name"); set => Q("realm_name", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Username? Username { get => Q<Elastic.Clients.Elasticsearch.Username?>("username"); set => Q("username", value); }
	}

	public sealed partial class SecurityGetApiKeyRequest : PlainRequestBase<SecurityGetApiKeyRequestParameters>
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityGetApiKey;
		protected override HttpMethod HttpMethod => HttpMethod.GET;
		protected override bool SupportsBody => false;
		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Id? Id { get => Q<Elastic.Clients.Elasticsearch.Id?>("id"); set => Q("id", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Name? Name { get => Q<Elastic.Clients.Elasticsearch.Name?>("name"); set => Q("name", value); }

		[JsonIgnore]
		public bool? Owner { get => Q<bool?>("owner"); set => Q("owner", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Name? RealmName { get => Q<Elastic.Clients.Elasticsearch.Name?>("realm_name"); set => Q("realm_name", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Username? Username { get => Q<Elastic.Clients.Elasticsearch.Username?>("username"); set => Q("username", value); }
	}

	public sealed partial class SecurityGetApiKeyRequestDescriptor : RequestDescriptorBase<SecurityGetApiKeyRequestDescriptor, SecurityGetApiKeyRequestParameters>
	{
		internal SecurityGetApiKeyRequestDescriptor(Action<SecurityGetApiKeyRequestDescriptor> configure) => configure.Invoke(this);
		public SecurityGetApiKeyRequestDescriptor()
		{
		}

		internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityGetApiKey;
		protected override HttpMethod HttpMethod => HttpMethod.GET;
		protected override bool SupportsBody => false;
		public SecurityGetApiKeyRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id? id) => Qs("id", id);
		public SecurityGetApiKeyRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name? name) => Qs("name", name);
		public SecurityGetApiKeyRequestDescriptor Owner(bool? owner = true) => Qs("owner", owner);
		public SecurityGetApiKeyRequestDescriptor RealmName(Elastic.Clients.Elasticsearch.Name? realmName) => Qs("realm_name", realmName);
		public SecurityGetApiKeyRequestDescriptor Username(Elastic.Clients.Elasticsearch.Username? username) => Qs("username", username);
		protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
		{
		}
	}
}